home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Form / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.2 KB  |  127 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Forward Declarations
  42. //========================================================================================
  43.  
  44. class FW_CPart;
  45. class FW_CString;
  46. class FW_CMenuBar;
  47. class FW_CMenuEvent;
  48. class FW_CPresentation;
  49. class FW_CPictureShape;
  50.  
  51. //========================================================================================
  52. // CFormPart
  53. //========================================================================================
  54.  
  55. class CFormPart : public FW_CPart
  56. {
  57. //----------------------------------------------------------------------------------------
  58. //    Initialization/Destruction
  59. //
  60. public:
  61.     
  62.     FW_DECLARE_AUTO(CFormPart)
  63.     
  64.     CFormPart(ODPart* odPart);
  65.     virtual ~CFormPart();
  66.  
  67.     virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);    // Override
  68.  
  69. //----------------------------------------------------------------------------------------
  70. //    Inherited API
  71. //
  72. public:
  73.     virtual FW_CFrame*            NewFrame(Environment* ev,
  74.                                          ODFrame* odFrame,
  75.                                          FW_CPresentation* presentation,
  76.                                          FW_Boolean fromStorage);
  77.  
  78.     virtual FW_Handled            DoAdjustMenus(Environment* ev,
  79.                                          FW_CMenuBar* menuBar, 
  80.                                           FW_Boolean hasMenuFocus,
  81.                                           FW_Boolean isRoot);
  82.  
  83.     virtual FW_Handled            DoMenu(Environment* ev,
  84.                                            const FW_CMenuEvent& theMenuEvent);
  85.  
  86.     virtual FW_Handled    DoAbout(Environment* ev);
  87.     virtual FW_CContent*        NewPartContent(Environment* ev);
  88.  
  89. //----------------------------------------------------------------------------------------
  90. //    New API
  91. //
  92. public:
  93.     FW_CPresentation*     GetPwdDialogPresentation();
  94.     
  95.     void                 DoFormCommand(Environment* ev);
  96.  
  97.     void                 GetResourceString(Environment* ev,
  98.                                              FW_ResourceID multiStringID,
  99.                                              FW_ResourceID stringID,
  100.                                              FW_CString& string);
  101.     
  102.     FW_CPresentation*    GetPrintPresentation() const
  103.                             {return fPrintPresentation;}
  104.     
  105. //----------------------------------------------------------------------------------------
  106. //    Data Members
  107. //
  108. private:
  109.     FW_CString                fTextData;
  110.     FW_Boolean                fIsForm;
  111.  
  112.     FW_CPresentation*        fMainPresentation;
  113.     FW_CPresentation*        fPrintPresentation;
  114.     FW_CPresentation*        fPwdDialogPresentation;
  115. };
  116.  
  117. //==============================================================================
  118. // CFormPart Inlines
  119. //==============================================================================
  120.  
  121. inline FW_CPresentation* CFormPart::GetPwdDialogPresentation()
  122. {
  123.     return fPwdDialogPresentation;
  124. }
  125.  
  126. #endif
  127.